<template>

      <a-col :span="24">
        <div class="card-title">{{diseaseCode}}-1: 患者入院病情评估</div>

      <a-col :span="24">
        <div class="card-page">住院治疗符合指症：</div>
      </a-col>
      <a-col :span="span23.includes(main1List[i-1])?24:12" v-for="i in Math.min(main1List.length, 3)">
        <a-form-item v-if="main1List[i-1].submitName=='AECOPD-1-6-1'" :label="main1List[i-1].title" :name="main1List[i-1].submitName">
          <a-select
              v-model:value="main1List[i-1].defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,main1List[i-1].submitName)"
          >
            <a-select-option
                v-for="dict in main1List[i-1].dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>

        <a-form-item v-if="main1List[i-1].submitName=='AECOPD-1-6-1-1'&&form1['AECOPD-1-6-1']=='oth'" :label="main1List[i-1].title" :name="main1List[i-1].submitName">
          <a-select
              v-model:value="main1List[i-1].defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,main1List[i-1].submitName)"
          >
            <a-select-option
                v-for="dict in main1List[i-1].dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>

  </a-col>
      <a-col :span="24">
        <div class="card-page">入院后首次病情严重程度评估与分级：</div>
      </a-col>
      <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-1-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-1-1-1']=='y'">
            <a-form-item v-if="disease.useType=='select'&&disease.submitName=='AECOPD-1-1-2'" :label="disease.title" :name="disease.submitName">
              <a-select
                  v-model:value="disease.defaltValue"
                  placeholder="请选择属性类型" allow-clear
                   @change="changeSelect($event,disease.submitName)"

              >
                <a-select-option
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"

                >
                  {{ dict.dictName }}
                </a-select-option>
              </a-select>
              
            </a-form-item>
            <a-form-item v-if="disease.useType=='checkbox'&&((disease.submitName=='AECOPD-1-6-2'&&form1['AECOPD-1-1-2']=='a')||(disease.submitName=='AECOPD-1-6-3'&&form1['AECOPD-1-1-2']=='b')||(disease.submitName=='AECOPD-1-6-4'&&form1['AECOPD-1-1-2']=='c'))" :label="disease.title" :name="disease.submitName">
              <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
                <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                            v-for="dict in disease.dictList"
                            :key="dict.dictCode">{{
                    dict.dictName
                  }}</a-checkbox>
              </a-checkbox-group>
              
            </a-form-item>
          </a-col>
      </a-col>

      <a-col :span="24">
        <div class="card-page">入院后首次氧合评估（首次）：</div>
      </a-col>
      <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-2-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-1-2-1']=='y'">
          <a-form-item v-if="disease.useType=='select'&&(disease.submitName=='AECOPD-1-6-5'||disease.submitName=='AECOPD-1-2-3')" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='checkbox'&&((disease.submitName=='AECOPD-1-6-2'&&form1['AECOPD-1-1-2']=='a')||(disease.submitName=='AECOPD-1-6-3'&&form1['AECOPD-1-1-2']=='b')||(disease.submitName=='AECOPD-1-6-4'&&form1['AECOPD-1-1-2']=='c'))" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-2-2'" :label="disease.title" :name="disease.submitName">
            <a-radio-group v-model:value="disease.defaltValue">
              <a-radio
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
                  @change="changeRadio($event,disease.submitName)"
              >
                {{ dict.dictName }}
              </a-radio>
            </a-radio-group>
            
          </a-form-item>
          <a-form-item v-if="form1['AECOPD-1-2-2']=='y'&&(disease.submitName=='AECOPD-1-6-6'||(form1['AECOPD-1-2-3']=='b' &&disease.submitName=='AECOPD-1-2-3-4')||(form1['AECOPD-1-2-3']=='a' && ['AECOPD-1-2-3-5','AECOPD-1-2-3-6','AECOPD-1-2-3-7','AECOPD-1-2-3-8','AECOPD-1-2-3-9'].includes(disease.submitName)))" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>

        </a-col>
      </a-col>
      <a-col :span="24">
        <div class="card-page">入院后首次（含急诊）胸部影像学检查：</div>
      </a-col>
      <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-3-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-1-3-1']=='y'">
          <a-form-item v-if="disease.useType=='select'&&(disease.submitName=='AECOPD-1-6-7')" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='checkbox'&&(disease.submitName=='AECOPD-1-3-2'||disease.submitName=='AECOPD-1-3-3')" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-form-item v-if="disease.submitName=='AECOPD-1-3-3-1'&&form1['AECOPD-1-3-3']!=null&&form1['AECOPD-1-3-3'].includes('oth')" :label="disease.title" :name="disease.submitName">
            <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            
          </a-form-item>

        </a-col>
      </a-col>
      <a-col :span="24">
        <div class="card-page">入院后首次心电图检查：</div>
      </a-col>
      <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-4-1'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeRadio($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>
      <a-col span="24" v-if="form1['AECOPD-1-4-1']=='y'">
        <a-form-item v-if="disease.useType=='select'&&(disease.submitName=='AECOPD-1-6-8')" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"

          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"

            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='checkbox'&&(disease.submitName=='AECOPD-1-4-2')" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
          
        </a-form-item>
        <a-form-item v-if="disease.submitName=='AECOPD-1-4-2-1'&&form1['AECOPD-1-4-2']!=null&&form1['AECOPD-1-4-2'].includes('oth')" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
          
        </a-form-item>

      </a-col>
    </a-col>
      <a-col :span="24">
        <div class="card-page">入院后首次实验室检查：</div>
      </a-col>
      <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main1List">
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-1-5-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-1-5-1']=='y'">
          <a-form-item v-if="disease.useType=='select'&&(disease.submitName=='AECOPD-1-6-9'
          ||(disease.submitName=='AECOPD-1-5-2-2'&&form1['AECOPD-1-5-2']!=null&&form1['AECOPD-1-5-2'].includes('m'))
           ||(disease.submitName=='AECOPD-1-5-2-3'&&form1['AECOPD-1-5-2']!=null&&form1['AECOPD-1-5-2'].includes('n')))" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='checkbox'&&(disease.submitName=='AECOPD-1-5-2')" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-form-item v-if="disease.submitName=='AECOPD-1-5-2-1'&&form1['AECOPD-1-5-2']!=null&&form1['AECOPD-1-5-2'].includes('oth')" :label="disease.title" :name="disease.submitName">
            <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='number'&&(
              (disease.submitName=='AECOPD-1-5-2-4'&&form1['AECOPD-1-5-2']!=null&&form1['AECOPD-1-5-2'].includes('m'))
           ||(disease.submitName=='AECOPD-1-5-2-5'&&form1['AECOPD-1-5-2']!=null&&form1['AECOPD-1-5-2'].includes('n')))" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>
        </a-col>
      </a-col>
      </a-col>
      <a-col :span="24">
        <div class="card-title">{{diseaseCode}}-2 危重患者收住ICU情况</div>
        <div class="card-page">收住ICU符合指征：</div>
        <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main2List">
          <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-2-1-1'" :label="disease.title" :name="disease.submitName">
            <a-radio-group v-model:value="disease.defaltValue">
              <a-radio
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
                  @change="changeRadio($event,disease.submitName)"
              >
                {{ dict.dictName }}
              </a-radio>
            </a-radio-group>
            
          </a-form-item>
          <a-col span="24" v-if="form1['AECOPD-2-1-1']=='y'">
            <div v-if="disease.submitName=='AECOPD-2-2-1'&&form1['AECOPD-2-1-3']!='UTD'" class="card-page">AECOPD治疗的分级：</div>
            <a-form-item v-if="disease.useType=='select'
            &&(disease.submitName=='AECOPD-2-1-2'||disease.submitName=='AECOPD-2-1-3'
            ||(disease.submitName=='AECOPD-2-3-1'&&form1['AECOPD-2-1-3']!='UTD')||(disease.submitName=='AECOPD-2-2-1'&&form1['AECOPD-2-1-3']!='UTD'))" :label="disease.title" :name="disease.submitName">
              <a-select
                  v-model:value="disease.defaltValue"
                  placeholder="请选择属性类型" allow-clear
                   @change="changeSelect($event,disease.submitName)"

              >
                <a-select-option
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode"
                    :value="dict.dictCode"

                >
                  {{ dict.dictName }}
                </a-select-option>
              </a-select>
              
            </a-form-item>


          </a-col>
        </a-col>

     </a-col>
  <a-col v-if="form1['CM-0-1-4-1']!=null && form1['CM-0-1-4-1'].length>0" :span="24">
    <div class="card-title">{{diseaseCode}}-3 氧疗使用情况</div>
    <div class="card-page">氧疗方法：</div>
    <a-col :span="span23.includes(disease.submitName)?24:12" v-for="disease in main3List">

      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-3-3-1'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeRadio($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>
      <a-col span="24" v-if="form1['AECOPD-3-3-1']=='y'">
        <div v-if="disease.submitName=='AECOPD-3-2-1'" class="card-page">氧疗 2小时 后应复查动脉血气：</div>
        <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-3-2-1'" :label="disease.title" :name="disease.submitName">
          <a-radio-group v-model:value="disease.defaltValue">
            <a-radio
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
                @change="changeRadio($event,disease.submitName)"
            >
              {{ dict.dictName }}
            </a-radio>
          </a-radio-group>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='checkbox'" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)"  >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='select' " :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"

          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"

            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-form-item v-if="(form1['AECOPD-3-3-2']=='a'&&disease.submitName=='AECOPD-3-3-3')||(form1['AECOPD-3-3-2']=='b' &&disease.submitName=='AECOPD-3-3-4')" :label="disease.title" :name="disease.submitName">
          <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
          
        </a-form-item>

      </a-col>
    </a-col>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-4 抗菌药物使用情况</div>
    <a-col span="24" v-for="disease in main4List">
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-4-3-2'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeRadio($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>
      <a-col span="24" v-if="form1['AECOPD-4-3-2']=='y'">
        <div v-if="disease.submitName=='AECOPD-4-3-1'" class="card-page">首次起始经验性用药前病情判定分层：</div>
        <a-form-item v-if="disease.useType=='select'
            &&(disease.submitName=='AECOPD-4-3-1'||disease.submitName=='AECOPD-4-1-1'
            )" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"

          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"

            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-4-1-1']!='UTD'">
          <div v-if="disease.submitName=='AECOPD-4-1-1'" class="card-page">患者经验性起始抗菌药物选择：</div>
          <a-form-item v-if="disease.useType=='select'
            &&((disease.submitName=='AECOPD-4-1-4'&&form1['AECOPD-4-1-1']!='d')||(disease.submitName=='AECOPD-4-2-2-3'&&form1['AECOPD-4-1-1']=='a')
            ||(disease.submitName=='AECOPD-4-1-2-3'&&form1['AECOPD-4-1-1']=='b')
            ||(disease.submitName=='AECOPD-4-1-2-5'&&form1['AECOPD-4-1-1']=='c'))" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"

            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"

              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-4-1-2-3']=='oth'&&disease.submitName=='AECOPD-4-1-2-1-1'&&form1['AECOPD-4-1-1']=='a')
             || (form1['AECOPD-4-1-2-3']=='oth'&&disease.submitName=='AECOPD-4-1-2-4'&&form1['AECOPD-4-1-1']=='b')
             || (form1['AECOPD-4-1-2-5']=='oth'&&disease.submitName=='AECOPD-4-1-2-6'&&form1['AECOPD-4-1-1']=='c') )" :label="disease.title" :name="disease.submitName">
            <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='date'&&form1['AECOPD-4-1-1']!='d'" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
        </a-col>

      </a-col>
    </a-col>
  </a-col>

  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-5  支气管舒张剂、糖皮质激素使用情况 </div>
    <div class="card-page">支气管舒张剂、吸入糖皮质激素使用情况： </div>
  </a-col>

  <a-col :span="24" v-for="disease in main5List">

      <div v-if="disease.submitName=='AECOPD-5-2-1-2'" class="card-page">全身糖皮质激素使用情况：</div>
    <a-form-item v-if="disease.useType=='radio'&&form1['AECOPD-5-1-1']!=null&&form1['AECOPD-5-1-1'].includes('d')" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
      <a-form-item v-if="disease.useType=='select'
            " :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"

        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"

          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>
        
      </a-form-item>
    <a-form-item v-if="disease.useType=='checkbox'" :label="disease.title" :name="disease.submitName">
      <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
        <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                    v-for="dict in disease.dictList"
                    :key="dict.dictCode">{{
            dict.dictName
          }}</a-checkbox>
      </a-checkbox-group>
      
    </a-form-item>
    <a-form-item v-if="disease.useType=='date'&&form1['AECOPD-5-2-1-2']!='UTD'" :label="disease.title" :name="disease.submitName">
      <a-date-picker  v-model:value="disease.defaltValue"
                      :format="disease.rule"
                      :valueFormat="disease.rule"
                      @change="dateInput($event,disease.submitName)"
                      :show-time="disease.rule.length>10 "
                      style="width: 100%;"
      />
      
    </a-form-item>
    <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-5-2-1-2']=='oth'&&disease.submitName=='AECOPD-5-2-1-1')
             || (form1['AECOPD-5-1-1']!=null&&form1['AECOPD-5-1-1'].includes('oth')&&disease.submitName=='AECOPD-5-1-1-1')
              || (form1['AECOPD-5-2-1-2']=='oth'&&disease.submitName=='AECOPD-5-2-1-1'))" :label="disease.title" :name="disease.submitName">
      <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      
    </a-form-item>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-6 手术并发症与再次手术情况 </div>
    <div class="card-page">合并症：</div>
  </a-col>
  <a-col :span="24" v-for="disease in mai6List">
    <a-form-item v-if="disease.useType=='radio'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
    <a-col span="24" v-if="form1['AECOPD-6-6-1']=='y'">
      <a-form-item v-if="disease.submitName=='AECOPD-6-6-2'" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>
        
      </a-form-item>
      <a-col span="24" v-if="form1['AECOPD-6-6-2']=='a'">
        <div v-if="disease.submitName=='AECOPD-6-1-3'" class="card-page">有心力衰竭和心律失常时，首次处置选项：</div>
        <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName=='AECOPD-6-1-3'" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-6-1-3']!=null&&form1['AECOPD-6-1-3'].includes('oth')&&disease.submitName=='AECOPD-6-1-2-1')
             )" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
          
        </a-form-item>
      </a-col>
      <a-col span="24" v-if="form1['AECOPD-6-6-2']=='b'">
        <div v-if="disease.submitName=='AECOPD-6-1-3'" class="card-page">有肺动脉高压时，支持性治疗选项：：</div>
        <a-form-item v-if="disease.submitName=='AECOPD-6-2-3'" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"
          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-6-2-3']=='oth'&&disease.submitName=='AECOPD-6-2-2-1')
             )" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
          
        </a-form-item>
      </a-col>
      <a-col span="24" v-if="form1['AECOPD-6-6-2']=='c'">
        <div v-if="disease.submitName=='AECOPD-6-3-2-2'" class="card-page">有血栓形成高危因素时，首次处置选项：</div>
        <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName=='AECOPD-6-3-2-2'" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
          
        </a-form-item>
        <a-form-item v-if="(form1['AECOPD-6-3-2-2']!=null&&form1['AECOPD-6-3-2-2'].includes('a')&&disease.submitName=='AECOPD-6-3-2-3')
        ||(form1['AECOPD-6-3-2-2']!=null&&form1['AECOPD-6-3-2-2'].includes('b')&&disease.submitName=='AECOPD-6-3-2-4')" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"
          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-6-3-2-4']=='oth'&&disease.submitName=='AECOPD-6-3-2-5')
             )" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
          
        </a-form-item>
      </a-col>
      <a-col span="24" v-if="form1['AECOPD-6-6-2']=='d'">
        <div v-if="disease.submitName=='AECOPD-6-5-2'" class="card-page">有气胸时，首次处置选项：</div>
        <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName=='AECOPD-6-5-2'" :label="disease.title" :name="disease.submitName">
          <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
            <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                        v-for="dict in disease.dictList"
                        :key="dict.dictCode">{{
                dict.dictName
              }}</a-checkbox>
          </a-checkbox-group>
          
        </a-form-item>
        <a-form-item v-if="disease.useType=='input'&&(
              (form1['AECOPD-6-5-2']!=null&&form1['AECOPD-6-5-2'].includes('oth')&&disease.submitName=='AECOPD-6-5-2-1')
             )" :label="disease.title" :name="disease.submitName">
          <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
          
        </a-form-item>
      </a-col>
    </a-col>
  </a-col>
  <a-col v-if="form1['CM-0-1-4-1']!=null && form1['CM-0-1-4-1'].length>0" :span="24">
    <div class="card-title">{{diseaseCode}}-7 危重患者使用无创或有创机械通气治疗情况 </div>
  <a-col span="24" v-for="disease in mai7List">

    <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-7-4-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
            @change="changeinput($event,disease.submitName)"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
    <a-col span="24" v-if="form1['AECOPD-7-4-1']!='n'">
      <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-7-4-2'" :label="disease.title" :name="disease.submitName">
        <a-radio-group v-model:value="disease.defaltValue">
          <a-radio
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
              @change="changeinput($event,disease.submitName)"
          >
            {{ dict.dictName }}
          </a-radio>
        </a-radio-group>
        
      </a-form-item>
      <a-col span="24" v-if="form1['AECOPD-7-4-2']=='y'">
        <a-form-item v-if="disease.submitName=='AECOPD-7-4-3'" :label="disease.title" :name="disease.submitName">
          <a-select
              v-model:value="disease.defaltValue"
              placeholder="请选择属性类型" allow-clear
               @change="changeSelect($event,disease.submitName)"
          >
            <a-select-option
                v-for="dict in disease.dictList"
                :key="dict.dictCode"
                :value="dict.dictCode"
            >
              {{ dict.dictName }}
            </a-select-option>
          </a-select>
          
        </a-form-item>
        <a-col span="24" v-if="form1['AECOPD-7-4-3']=='a'||form1['AECOPD-7-4-3']=='c'">
          <div v-if="disease.submitName=='AECOPD-7-4-3'" class="card-page">危重患者无创正压通气（NIV）治疗符合指征：</div>
          <a-form-item v-if="disease.submitName=='AECOPD-7-1-2'" :label="disease.title" :name="disease.submitName">
            <a-select
                v-model:value="disease.defaltValue"
                placeholder="请选择属性类型" allow-clear
                 @change="changeSelect($event,disease.submitName)"
            >
              <a-select-option
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
              >
                {{ dict.dictName }}
              </a-select-option>
            </a-select>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName=='AECOPD-7-1-3-1'" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='date'&&form1['AECOPD-7-1-3-1']!=null&&form1['AECOPD-7-1-3-1']!=null&&form1['AECOPD-7-1-3-1'].includes('j')&&(disease.submitName=='AECOPD-7-1-6'||disease.submitName=='AECOPD-7-1-7')" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
          <a-form-item v-if="disease.submitName=='AECOPD-7-1-8'&&form1['AECOPD-7-1-3-1']!=null&&form1['AECOPD-7-1-3-1'].includes('j')" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>
        </a-col>
        <a-col span="24" v-if="form1['AECOPD-7-4-3']=='b'">
          <div v-if="disease.submitName=='AECOPD-7-2-2'" class="card-page">有肺动脉高压时，支持性治疗选项：</div>
          <div v-if="disease.submitName=='AECOPD-7-3-1'" class="card-page">危重患者实施有创-无创序贯通气疗法：</div>
          <a-form-item v-if="disease.useType=='checkbox'&&disease.submitName=='AECOPD-7-2-2'" :label="disease.title" :name="disease.submitName">
            <a-checkbox-group v-model:value="disease.defaultValue" @change="checkSave($event,disease.submitName)" >
              <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                          v-for="dict in disease.dictList"
                          :key="dict.dictCode">{{
                  dict.dictName
                }}</a-checkbox>
            </a-checkbox-group>
            
          </a-form-item>

          <a-form-item v-if="disease.useType=='date'&&form1['AECOPD-7-1-3-1']!=null&&(disease.submitName=='AECOPD-7-2-5-1'||disease.submitName=='AECOPD-7-2-6')" :label="disease.title" :name="disease.submitName">
            <a-date-picker  v-model:value="disease.defaltValue"
                            :format="disease.rule"
                            :valueFormat="disease.rule"
                            @change="dateInput($event,disease.submitName)"
                            :show-time="disease.rule.length>10 "
                            style="width: 100%;"
            />
          </a-form-item>
          <a-form-item v-if="disease.submitName=='AECOPD-7-2-7'" :label="disease.title" :name="disease.submitName">
            <a-input-number  v-model:value="disease.defaltValue"  @change="numberInput($event,disease.submitName)"  allow-clear  style="width: 100%;"/>
            
          </a-form-item>
          <a-form-item v-if="disease.useType=='radio'&&disease.submitName=='AECOPD-7-3-1'" :label="disease.title" :name="disease.submitName">
            <a-radio-group v-model:value="disease.defaltValue">
              <a-radio
                  v-for="dict in disease.dictList"
                  :key="dict.dictCode"
                  :value="dict.dictCode"
                  @change="changeinput($event,disease.submitName)"
              >
                {{ dict.dictName }}
              </a-radio>
            </a-radio-group>
            
          </a-form-item>
        </a-col>
      </a-col>
    </a-col>

  </a-col>
  </a-col>
  <a-col :span="24">
    <div class="card-title">{{diseaseCode}}-8 住院期间为患者提供健康教育与出院时提供教育告知情况</div>
  </a-col>
    <div class="card-page">住院期间为患者提供健康教育：</div>
  <a-col :span="24" v-for="disease in mai8List">
    <div v-if="disease.submitName=='AECOPD-8-3-1'" class="card-page">出院时提供教育告知五要素情况：</div>
    <a-form-item v-if="disease.submitName=='AECOPD-8-1-1'" :label="disease.title" :name="disease.submitName">
      <a-radio-group v-model:value="disease.defaltValue" @change="changeinput($event,disease.submitName)">
        <a-radio
            v-for="dict in disease.dictList"
            :key="dict.dictCode"
            :value="dict.dictCode"
        >
          {{ dict.dictName }}
        </a-radio>
      </a-radio-group>
      
    </a-form-item>
    <a-col span="24" v-if="form1['AECOPD-8-1-1']=='y'">
      <a-form-item v-if="disease.useType=='select'" :label="disease.title" :name="disease.submitName">
        <a-select
            v-model:value="disease.defaltValue"
            placeholder="请选择属性类型" allow-clear
             @change="changeSelect($event,disease.submitName)"
        >
          <a-select-option
              v-for="dict in disease.dictList"
              :key="dict.dictCode"
              :value="dict.dictCode"
          >
            {{ dict.dictName }}
          </a-select-option>
        </a-select>
        
      </a-form-item>
     </a-col>
    <a-form-item v-if="disease.submitName=='AECOPD-8-3-1'&&form1['CM-4-3']!='e'" :label="disease.title" :name="disease.submitName">
      <a-checkbox-group v-model:value="disease.defaultValue"   @change="checkSave($event,disease.submitName)" >
        <a-checkbox :value="dict.dictCode" :name="disease.submitName"
                    v-for="dict in disease.dictList" :key="dict.dictCode">{{
            dict.dictName
          }}</a-checkbox>
      </a-checkbox-group>
      
    </a-form-item>
    <a-form-item v-if="disease.submitName=='AECOPD-8-3-1-1'&&form1['CM-4-3']!='e'&&form1['AECOPD-8-3-1']!=null&&form1['AECOPD-8-3-1'].includes('oth')" :label="disease.title" :name="disease.submitName">
      <a-input  v-model:value="disease.defaltValue"  @change="changeinput($event,disease.submitName)" allow-clear  />
      
    </a-form-item>
  </a-col>
</template>

<script setup name="PatientAECOPDForm">
import {ref, reactive, onMounted, watch} from 'vue';


const main3List = ref([]);
const main4List = ref([]);
const main5List = ref([]);
const mai6List = ref([]);
const mai7List = ref([]);
const mai8List = ref([]);
const mai9List = ref([]);
const main2List = ref([]);
const main1List = ref([]);
const cs41 = ref([
  "CS-4-1",
  "CS-4-2",
  "CS-4-3-1",
  "CS-4-3-2",
  "CS-4-3-3",
]);
const span23= ref([
  'AECOPD-1-1-1',
  'AECOPD-1-1-2',
  'AECOPD-1-6-2',
  'AECOPD-1-6-3',
  'AECOPD-1-6-4',
  'AECOPD-1-3-1',
  'AECOPD-1-3-2',
  'AECOPD-1-6-7',
  'AECOPD-1-3-3',
  'AECOPD-1-3-3-1',
  'AECOPD-1-4-2',
  'AECOPD-1-4-2-1',
    'AECOPD-1-5-2',
  'AECOPD-2-1-1',
  'AECOPD-2-1-2',
  'AECOPD-2-1-3',
  'AECOPD-2-3-1',
  'AECOPD-2-2-1',
]);
let rsm =  ref({
  "CS-1-1-1": false,
  "CS-1-2-5": false,
  "CM-1-1-1": false,
  "CS-5-1": false,
  "CS-5-3": false,
});
const props = defineProps({
// 表单数据
  diseaseList: Object,
  form1: Object,
  diseaseCode:String,
});
onMounted(async() => {
  console.log(JSON.stringify(props))
});
watch(
    () => props.diseaseList,
() => {
  console.log("---------------------=================================")
    for(let i = 0; i < props.diseaseList.length; i ++) {
     if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-2"){
        main2List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-1"){
        main1List.value.push(props.diseaseList[i])
      } else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-3"){
        main3List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-4"){
        main4List.value.push(props.diseaseList[i])
      }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-5"){
       main5List.value.push(props.diseaseList[i])
     } else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-6"){
       mai6List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-7"){
       mai7List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-8"){
       mai8List.value.push(props.diseaseList[i])
     }else if(props.diseaseList[i].diseaseGroup==props.diseaseCode+"-9"){
       mai9List.value.push(props.diseaseList[i])
     }
    }

}
);

const changeinput =  (el,data) => {
  props.form1[data] = el.target.value
}
const changeRadio =  (el,data) => {
  props.form1[data] = el.target.value
}
const checkSave=  (el,data) => {
  props.form1[data] = el
}


const changeSelect =  (value,data) => {
  if (typeof value === "undefined"){
    props.form1[data] = null
  }else {
    props.form1[data] = value
  }
}
const numberInput =  (el,data) => {
  props.form1[data] = el
}
const dateInput =  (el,data) => {
  props.form1[data] = el
}
const selectRsm = (el,rule,data) => {
  debugger
  props.form1[data] = el.target.value
  if (el.target.value == rule) {
    rsm.value[data] = true;
  } else {
    rsm.value[data] = false;
  }
};

</script>

<style scoped lang="less">
.card-title {
  width: 100%;
  border-left: 5px solid;
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-size: large;
  font-weight: bold;
  padding-left: 2px;
  margin-bottom: 2px;
}
.card-page {
  width: 100%;
  font-weight: bold;
  color: #092b00;
  padding-left: 2px;
  margin-bottom: 2px;
}
.ant-form-item{
  border-bottom:1px solid var(--primary-color);
}
.line {
border-top: 1px solid #b2f1e8; /* 设置横线的样式，比如颜色和宽度 */
margin: 1px 0; /* 设置横线的上下外边距 */
padding-left: -100px!important;
}
</style>
